#include <iostream>
#include <string>

using CStrRef = const std::string &;

class Person
{
public:
    Person() : name(""), age(0), ID("") {}
    Person(CStrRef name, int age, CStrRef ID) : name(name), age(age), ID(ID) {}
    void show()
    {
        std::cout<<"父类构造"<<std::endl;
        std::cout<<"名字"<<name<<"年龄"<<age<<"身份证"<<ID<<std::endl;
    }
    
    ~Person()
    {
        std::cout<<"父类析构"<<std::endl;
    }
protected:
    std::string name;
    int age;
    std::string ID;
};

class Student :private Person
{
public:
    Student(CStrRef name,int age,CStrRef ID,int score):Person(name,age,ID)
    {
        std::cout<<"子类构造函数"<<std::endl;
        this->score = score;
    }
    ~Student()
    {
        std::cout<<"子类析构函数"<<std::endl;
    }
    void show(int a)
    {
        Person::show();
        std::cout<<"score: "<<this->score<<std::endl;
    }
private:
    int score;
};


int main ()
{
    Student s("zhangsan",18,"123",98);
    s.show(1);
    return 0;
}